package com.qf.qfusermanager.adapter;

import com.qf.common.model.QfUser;
import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
public class UserAdapter extends User {

    private QfUser qfUser;

    public UserAdapter(String username, String password, Collection<? extends GrantedAuthority> authorities,QfUser qfUser) {
        super(username, password, authorities);
        this.qfUser = qfUser;
    }

    public UserAdapter(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public UserAdapter(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
